/***********************************************************
* Purpose : delete Question 
* Author : NuoiNV
* Date: 10/4/2012
* Description: delete Question
*/
IF EXISTS ( SELECT * FROM SYSOBJECTS WHERE NAME = 'sp_deleteAnswerByQuestionID' ) 
BEGIN
	DROP PROC sp_deleteAnswerByQuestionID
END
GO
CREATE PROC sp_deleteAnswerByQuestionID
	@Question_ID	INT,
	@RESULT INT OUTPUT
AS
	BEGIN 
		IF EXISTS (SELECT * FROM Answer  WHERE Question_ID = @Question_ID)
		Begin
			DELETE Answer WHERE Question_ID = @Question_ID
			SET @RESULT = 1
		END
		ELSE
		BEGIN
		SET @RESULT = 0
		END
	END 